<jsp:useBean id="clientBean" class="clientbean.ClientWebBean" scope="session" />
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Low-Price Cameras Online</title>
</head>
<body>
<div align="center">
<h1>Low-Price Cameras Online</h1>
<table width="700px" border="1">
	<tr>
		<td width="200px" valign="top">
			<jsp:include page="left_menu.jsp" />
		</td>
		<td width="500px">
			<%
				String action = request.getParameter("action");
				if(action != null){
					if(action.equalsIgnoreCase("search")){
						String term = request.getParameter("term");
					%>
						Results for search: <%= term %>
						<jsp:include page="search.jsp">
							<jsp:param value="<%= term %>" name="term"/>
						</jsp:include>
					<%
					} else if(action.equalsIgnoreCase("addToCart")) { %>
						
					<% } else if(action.equalsIgnoreCase("order")) { %>
						<jsp:include page="order.jsp" />
					<% } else if(action.equalsIgnoreCase("history")){ %>
						<jsp:include page="history.jsp" />
					<% } else if(action.equalsIgnoreCase("login")) {
						String username = request.getParameter("username");
						String password = request.getParameter("password");
					%>
					<jsp:include page="login.jsp">
						<jsp:param value="<%= username %>" name="username" />
						<jsp:param value="<%= password %>" name="password" />
					</jsp:include>
					<% } else if(action.equalsIgnoreCase("logout")){ %>
						<jsp:include page="logout.jsp" />
					<% } else if(action.equalsIgnoreCase("register")){ %>
						<jsp:include page="register.jsp" />
					<% } else { %>
						
					<% }
				}
			%>
		</td>
	</tr>
</table>
</div>
</body>
</html>